package domain;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class Order {
    private String id; // 订单编号
    private double money; // 订单总价
    private String receiverAddress; // 送货地址
    private String receiverName; // 收货人姓名
    private String receiverPhone; // 收货人电话
    private int payState; // 订单状态
    private Date orderTime; // 下单时间
    private User user; // 订单所属用户
    private List<OrderItem> orderItems; //订单项

    public Order() {
    }

    public Order(String id, double money, String receiverAddress, String receiverName, String receiverPhone, int payState, Date orderTime, User user) {
        this.id = id;
        this.money = money;
        this.receiverAddress = receiverAddress;
        this.receiverName = receiverName;
        this.receiverPhone = receiverPhone;
        this.payState = payState;
        this.orderTime = orderTime;
        this.user = user;
        this.orderItems = new ArrayList<OrderItem>();
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public double getMoney() {
        return money;
    }

    public void setMoney(double money) {
        this.money = money;
    }

    public String getReceiverAddress() {
        return receiverAddress;
    }

    public void setReceiverAddress(String receiverAddress) {
        this.receiverAddress = receiverAddress;
    }

    public String getReceiverName() {
        return receiverName;
    }

    public void setReceiverName(String receiverName) {
        this.receiverName = receiverName;
    }

    public String getReceiverPhone() {
        return receiverPhone;
    }

    public void setReceiverPhone(String receiverPhone) {
        this.receiverPhone = receiverPhone;
    }

    public int getPayState() {
        return payState;
    }

    public void setPayState(int payState) {
        this.payState = payState;
    }

    public Date getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(Date orderTime) {
        this.orderTime = orderTime;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public List<OrderItem> getOrderItems() {
        return orderItems;
    }

    public void setOrderItems(List<OrderItem> orderItems) {
        this.orderItems = orderItems;
    }
}
